package com.ruoyi.system.utils;

import org.apache.commons.lang3.StringUtils;

/**
 * 指令词工具
 */
public class InstructionUtils {

    /**
     * 生成FastGPT调用指令词
     */
    public static String generateInsturction(String industry,String surveyIndustryKeynote,String chapterName,String title,
                                             String knowledgeBase,String surveyRequire) {

        String knowledgeBaseStr = "";
        if (StringUtils.isNotEmpty(knowledgeBase)) {
            knowledgeBaseStr = "，并依据本地知识库中的文件" + knowledgeBase;
        }

        String surveyRequireStr = "";
        if (StringUtils.isNotEmpty(surveyRequire)) {
            surveyRequireStr = "，输出白皮书内容，内容生成要求为" + surveyRequire;
        }

        String instruction = "需要生成一段关于" + industry + "行业的白皮书内容，根据关键词" + surveyIndustryKeynote + "，再结合白皮书章节 " +
                chapterName + "和标题" + title + knowledgeBaseStr + surveyRequireStr + "，按{标题,内容}json格式给出";

        return instruction;
    }
}
